Array.prototype.each = function (item, index) {

}

function each(arr, callback) {
    for (let i = 0; i < arr.length; i++) {
        // const element = arr[i];
        let flag = callback.call(arr, arr[i], i)
        if (flag === false) {
            break;
        }

    }
}